<?php

namespace app\admin\model\exam;

use think\Model;


class GradeDetail extends Model
{
    // 表名
    protected $name = 'exam_grade_detail';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function grade()
    {
        return $this->belongsTo('app\admin\model\exam\Grade', 'grade_id')->setEagerlyType(0);
    }

    public function question()
    {
        return $this->belongsTo('app\admin\model\exam\QuestionModel', 'question_id')->setEagerlyType(0);
    }
}
